package org.techism.client;

import org.techism.client.panel.EventPanelView;
import org.techism.client.panel.GroupPanelView;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TabPanel;

public class Techism2 implements EntryPoint {

    /**
     * This is the entry point method.
     */
    public void onModuleLoad() {
        final DockPanel dp = new DockPanel();
        dp.setWidth("100%");

        final TabPanel tabPanel = new TabPanel();
        tabPanel.setWidth("100%");
        final FlowPanel eventPanel = new FlowPanel();
        tabPanel.add(eventPanel, "Events");
        final FlowPanel groupPanel = new FlowPanel();
        tabPanel.add(groupPanel, "Veranstalter");
        final FlowPanel conferencePanel = new FlowPanel();
        tabPanel.add(conferencePanel, "(Un)conferences");
        tabPanel.selectTab(0);

        dp.add(tabPanel,DockPanel.CENTER);
        RootPanel.get("tabPanel").add(dp);

        final GroupPanelView groupPanelView = new GroupPanelView(groupPanel);
        groupPanelView.addGroupTags();
        groupPanelView.addGroups();
        final EventPanelView eventPanelView = new EventPanelView(eventPanel);
        eventPanelView.addEventTags();
        eventPanelView.addEvents();
    }
}
